package com.jl.scr;

public class ScriptParse {

	public void FileParse(String path) {

	}

	public Batch getBatch() {
		return new Batch();
	}

	public static SCR parse(String scr) {
		int index = scr.indexOf(' ');
		if(index == -1){
			index = scr.length();
		}
		String header = scr.substring(0, index);
		switch (KeyWords.getKeyWord(header)) {
		case KeyWords.CMD:
			return CMD.parse(scr);
		case KeyWords.REM:
			return REM.parse(scr);
		default:
			return new OtherScr(scr);
		}

	}
}
